package com.lmxdawn.api.dnf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lmxdawn.api.dnf.dto.OrderTotalVo;
import com.lmxdawn.api.dnf.dto.UserOrderTotalVo;
import com.lmxdawn.api.dnf.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    Order selectByPrimaryKey(@Param("id") String id);

    List<Order> selectAll();

    void insertOrder(Order order);

    void updateByPrimaryKey(Order order);

    void deleteByPrimaryKey(@Param("id") String id);

    OrderTotalVo queryMonthOrderTotal(@Param("server") String server);
    OrderTotalVo queryOrderTotal(@Param("server") String server, @Param("startTime") String startTime, @Param("endTime") String endTime);

    UserOrderTotalVo querySaleOrderTotalByUser(String id);
}
